<template>
  <div>
    <h1>浏览记录</h1>
    <ul>
        <li v-for="(x,i) in list" :key="i"> <a href="#" @click="browsing(x)">{{x}}</a> </li>
    </ul>

  </div>
</template>

<script>
export default {
    data(){
        return{
            list:[],
            userid:localStorage.getItem('userid')
        }
    },
    methods:{
        getbrowsing(){
            this.axios.get('getbrowsing?userid='+this.userid)
            .then(res=>{
                this.list = res.data.data
            })
        },
        browsing(x){
            window.location.href = x
        }
    },
    mounted(){
        this.getbrowsing()
    }

}
</script>

<style>

</style>